﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.hud {
    import flash.utils.*;
    import Display.DialogUI.*;
    import Classes.sim.*;
    import Display.*;

    public class CommodityPopup extends NotifyPopup implements IPlayerStateObserver {

        public static const CHANGE_THRESHOLD:int = 2;

        public var m_supplyTooltipAsset:Class;
        public var m_supplyTooltip:CommodityPopup_m_supplyTooltipAsset;
        protected var m_commodityName:String;

        public function CommodityPopup(_arg1:String, _arg2:Function=null){
            this.m_supplyTooltipAsset = CommodityPopup_m_supplyTooltipAsset;
            this.m_supplyTooltip = (new CommodityPopup_m_supplyTooltipAsset() as CommodityPopup_m_supplyTooltipAsset);
            this.m_commodityName = _arg1;
            super(_arg2, null, 3000);
            Global.player.addObserver(this);
        }
        override protected function loadAssets():void{
            onAssetsLoaded();
        }
        override protected function createAssetDict():Dictionary{
            var _local1:Dictionary = new Dictionary();
            _local1["bgAsset"] = this.m_supplyTooltip;
            return (_local1);
        }
        override protected function createDialogView(_arg1:Dictionary):GenericDialogView{
            return (new CommodityPopupView(_arg1, this.m_commodityName));
        }
        public function forceUpdateValue(_arg1:int):void{
            var _local2:CommodityPopupView;
            if ((m_jpanel is CommodityPopupView)){
                _local2 = (m_jpanel as CommodityPopupView);
                _local2.forceUpdateValue(_arg1);
            };
        }
        public function energyChanged(_arg1:Number):void{
        }
        public function levelChanged(_arg1:int):void{
        }
        public function commodityChanged(_arg1:int, _arg2:String):void{
            showTimed();
        }
        public function xpChanged(_arg1:int):void{
        }
        public function goldChanged(_arg1:int):void{
        }
        public function cashChanged(_arg1:int):void{
        }

    }
}//package Display.hud 
